<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en-US">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=11"/>
<meta name="generator" content="Doxygen 1.9.7"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>My Project: Src/SBUS.c Source File</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr id="projectrow">
  <td id="projectalign">
   <div id="projectname">My Project<span id="projectnumber">&#160;1.0</span>
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.9.7 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
var searchBox = new SearchBox("searchBox", "search/",'.html');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(function() {
  initMenu('',true,false,'search.php','Search');
  $(document).ready(function() { init_search(); });
});
/* @license-end */
</script>
<div id="main-nav"></div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<div id="MSearchResults">
<div class="SRPage">
<div id="SRIndex">
<div id="SRResults"></div>
<div class="SRStatus" id="Loading">Loading...</div>
<div class="SRStatus" id="Searching">Searching...</div>
<div class="SRStatus" id="NoMatches">No Matches</div>
</div>
</div>
</div>
</div>

<div id="nav-path" class="navpath">
  <ul>
<li class="navelem"><a class="el" href="dir_413f4e031a85da0d68269c6fd2f76e1c.html">Src</a></li>  </ul>
</div>
</div><!-- top -->
<div class="header">
  <div class="headertitle"><div class="title">SBUS.c</div></div>
</div><!--header-->
<div class="contents">
<a href="_s_b_u_s_8c.html">Go to the documentation of this file.</a><div class="fragment"><div class="line"><a id="l00001" name="l00001"></a><span class="lineno">    1</span> </div>
<div class="line"><a id="l00011" name="l00011"></a><span class="lineno">   11</span><span class="comment">/*</span></div>
<div class="line"><a id="l00012" name="l00012"></a><span class="lineno">   12</span><span class="comment">*********************************************************************************************************</span></div>
<div class="line"><a id="l00013" name="l00013"></a><span class="lineno">   13</span><span class="comment">*                                             INCLUDE FILES</span></div>
<div class="line"><a id="l00014" name="l00014"></a><span class="lineno">   14</span><span class="comment">*********************************************************************************************************</span></div>
<div class="line"><a id="l00015" name="l00015"></a><span class="lineno">   15</span><span class="comment">*/</span></div>
<div class="line"><a id="l00016" name="l00016"></a><span class="lineno">   16</span><span class="preprocessor">#include &quot;<a class="code" href="_s_b_u_s_8h.html">SBUS.h</a>&quot;</span></div>
<div class="line"><a id="l00017" name="l00017"></a><span class="lineno">   17</span> </div>
<div class="line"><a id="l00018" name="l00018"></a><span class="lineno">   18</span><span class="comment">/*</span></div>
<div class="line"><a id="l00019" name="l00019"></a><span class="lineno">   19</span><span class="comment">*********************************************************************************************************</span></div>
<div class="line"><a id="l00020" name="l00020"></a><span class="lineno">   20</span><span class="comment">*                                               CONSTANTS</span></div>
<div class="line"><a id="l00021" name="l00021"></a><span class="lineno">   21</span><span class="comment">*********************************************************************************************************</span></div>
<div class="line"><a id="l00022" name="l00022"></a><span class="lineno">   22</span><span class="comment">*/</span></div>
<div class="line"><a id="l00023" name="l00023"></a><span class="lineno">   23</span> </div>
<div class="line"><a id="l00024" name="l00024"></a><span class="lineno">   24</span> </div>
<div class="line"><a id="l00025" name="l00025"></a><span class="lineno">   25</span><span class="comment">/*</span></div>
<div class="line"><a id="l00026" name="l00026"></a><span class="lineno">   26</span><span class="comment">*********************************************************************************************************</span></div>
<div class="line"><a id="l00027" name="l00027"></a><span class="lineno">   27</span><span class="comment">*                                               变量定义</span></div>
<div class="line"><a id="l00028" name="l00028"></a><span class="lineno">   28</span><span class="comment">*********************************************************************************************************</span></div>
<div class="line"><a id="l00029" name="l00029"></a><span class="lineno">   29</span><span class="comment">*/</span></div>
<div class="line"><a id="l00030" name="l00030"></a><span class="lineno">   30</span> </div>
<div class="line"><a id="l00032" name="l00032"></a><span class="lineno"><a class="line" href="_s_b_u_s_8h.html#af938609143ba6f0252e697394a2ff8ed">   32</a></span><a class="code hl_struct" href="struct_s_b_u_s___c_h.html">SBUS_CH</a> <a class="code hl_variable" href="_s_b_u_s_8c.html#af938609143ba6f0252e697394a2ff8ed">SBUS</a>;</div>
<div class="line"><a id="l00034" name="l00034"></a><span class="lineno"><a class="line" href="_s_b_u_s_8h.html#a64486f5f617b54d015d9b9b146d0fc17">   34</a></span>uint8_t <a class="code hl_variable" href="_s_b_u_s_8c.html#a64486f5f617b54d015d9b9b146d0fc17">SBUS_RX_BUF</a>[<a class="code hl_define" href="_s_b_u_s_8h.html#a0eb14764b7d79cc11d6e5d04cab47fc1">SBUS_BUFFER_SIZE</a>];</div>
<div class="line"><a id="l00035" name="l00035"></a><span class="lineno">   35</span><span class="comment">/*</span></div>
<div class="line"><a id="l00036" name="l00036"></a><span class="lineno">   36</span><span class="comment">*********************************************************************************************************</span></div>
<div class="line"><a id="l00037" name="l00037"></a><span class="lineno">   37</span><span class="comment">*                                               函数实现</span></div>
<div class="line"><a id="l00038" name="l00038"></a><span class="lineno">   38</span><span class="comment">*********************************************************************************************************</span></div>
<div class="line"><a id="l00039" name="l00039"></a><span class="lineno">   39</span><span class="comment">*/</span></div>
<div class="line"><a id="l00045" name="l00045"></a><span class="lineno"><a class="line" href="_s_b_u_s_8h.html#acfde23885769240b79347341938fa1c6">   45</a></span><span class="keywordtype">void</span> <a class="code hl_function" href="_s_b_u_s_8c.html#acfde23885769240b79347341938fa1c6">SBUS_Analyze</a>(<span class="keywordtype">void</span>)</div>
<div class="line"><a id="l00046" name="l00046"></a><span class="lineno">   46</span>{</div>
<div class="line"><a id="l00047" name="l00047"></a><span class="lineno">   47</span>    <span class="keywordflow">for</span>(<span class="keywordtype">int</span> i=0;i&lt;<a class="code hl_define" href="_s_b_u_s_8h.html#a0eb14764b7d79cc11d6e5d04cab47fc1">SBUS_BUFFER_SIZE</a>-<a class="code hl_define" href="_s_b_u_s_8h.html#a52f9a3a2bf446dbaf5f46770d6376727">SBUS_FRAME_SIZE</a>;i++)</div>
<div class="line"><a id="l00048" name="l00048"></a><span class="lineno">   48</span>    {</div>
<div class="line"><a id="l00049" name="l00049"></a><span class="lineno">   49</span>        <span class="keywordflow">if</span>(<a class="code hl_variable" href="_s_b_u_s_8c.html#a64486f5f617b54d015d9b9b146d0fc17">SBUS_RX_BUF</a>[i]==<a class="code hl_define" href="_s_b_u_s_8h.html#af3b2b5247a4c3e7e0d5c9eda5109fb72">SBUS_FRAME_HEADER</a>&amp;&amp;<a class="code hl_variable" href="_s_b_u_s_8c.html#a64486f5f617b54d015d9b9b146d0fc17">SBUS_RX_BUF</a>[i+<a class="code hl_define" href="_s_b_u_s_8h.html#a52f9a3a2bf446dbaf5f46770d6376727">SBUS_FRAME_SIZE</a>-1]==<a class="code hl_define" href="_s_b_u_s_8h.html#a606b171ae009f4c9da0ff6a32de11325">SBUS_FRAME_FOOTER</a>)</div>
<div class="line"><a id="l00050" name="l00050"></a><span class="lineno">   50</span>        {</div>
<div class="line"><a id="l00051" name="l00051"></a><span class="lineno">   51</span>            <a class="code hl_variable" href="_s_b_u_s_8c.html#af938609143ba6f0252e697394a2ff8ed">SBUS</a>.CH1=((int16_t)<a class="code hl_variable" href="_s_b_u_s_8c.html#a64486f5f617b54d015d9b9b146d0fc17">SBUS_RX_BUF</a>[i+1]&gt;&gt;0|((int16_t)<a class="code hl_variable" href="_s_b_u_s_8c.html#a64486f5f617b54d015d9b9b146d0fc17">SBUS_RX_BUF</a>[i+2]&lt;&lt;8))&amp;0x07FF;</div>
<div class="line"><a id="l00052" name="l00052"></a><span class="lineno">   52</span>            <a class="code hl_variable" href="_s_b_u_s_8c.html#af938609143ba6f0252e697394a2ff8ed">SBUS</a>.CH2=((int16_t)<a class="code hl_variable" href="_s_b_u_s_8c.html#a64486f5f617b54d015d9b9b146d0fc17">SBUS_RX_BUF</a>[i+2]&gt;&gt;3|((int16_t)<a class="code hl_variable" href="_s_b_u_s_8c.html#a64486f5f617b54d015d9b9b146d0fc17">SBUS_RX_BUF</a>[i+3]&lt;&lt;5))&amp;0x07FF;</div>
<div class="line"><a id="l00053" name="l00053"></a><span class="lineno">   53</span>            <a class="code hl_variable" href="_s_b_u_s_8c.html#af938609143ba6f0252e697394a2ff8ed">SBUS</a>.CH3=((int16_t)<a class="code hl_variable" href="_s_b_u_s_8c.html#a64486f5f617b54d015d9b9b146d0fc17">SBUS_RX_BUF</a>[i+3]&gt;&gt;6|((int16_t)<a class="code hl_variable" href="_s_b_u_s_8c.html#a64486f5f617b54d015d9b9b146d0fc17">SBUS_RX_BUF</a>[i+4]&lt;&lt;2)|(int16_t)<a class="code hl_variable" href="_s_b_u_s_8c.html#a64486f5f617b54d015d9b9b146d0fc17">SBUS_RX_BUF</a>[5]&lt;&lt;10)&amp;0x07FF;</div>
<div class="line"><a id="l00054" name="l00054"></a><span class="lineno">   54</span>            <a class="code hl_variable" href="_s_b_u_s_8c.html#af938609143ba6f0252e697394a2ff8ed">SBUS</a>.CH4=((int16_t)<a class="code hl_variable" href="_s_b_u_s_8c.html#a64486f5f617b54d015d9b9b146d0fc17">SBUS_RX_BUF</a>[i+5]&gt;&gt;1|((int16_t)<a class="code hl_variable" href="_s_b_u_s_8c.html#a64486f5f617b54d015d9b9b146d0fc17">SBUS_RX_BUF</a>[i+6]&lt;&lt;7))&amp;0x07FF;</div>
<div class="line"><a id="l00055" name="l00055"></a><span class="lineno">   55</span>            <a class="code hl_variable" href="_s_b_u_s_8c.html#af938609143ba6f0252e697394a2ff8ed">SBUS</a>.CH5=((int16_t)<a class="code hl_variable" href="_s_b_u_s_8c.html#a64486f5f617b54d015d9b9b146d0fc17">SBUS_RX_BUF</a>[i+6]&gt;&gt;4|((int16_t)<a class="code hl_variable" href="_s_b_u_s_8c.html#a64486f5f617b54d015d9b9b146d0fc17">SBUS_RX_BUF</a>[i+7]&lt;&lt;4))&amp;0x07FF;</div>
<div class="line"><a id="l00056" name="l00056"></a><span class="lineno">   56</span>            <a class="code hl_variable" href="_s_b_u_s_8c.html#af938609143ba6f0252e697394a2ff8ed">SBUS</a>.CH6=((int16_t)<a class="code hl_variable" href="_s_b_u_s_8c.html#a64486f5f617b54d015d9b9b146d0fc17">SBUS_RX_BUF</a>[i+7]&gt;&gt;7|((int16_t)<a class="code hl_variable" href="_s_b_u_s_8c.html#a64486f5f617b54d015d9b9b146d0fc17">SBUS_RX_BUF</a>[i+8]&lt;&lt;1)|(int16_t)<a class="code hl_variable" href="_s_b_u_s_8c.html#a64486f5f617b54d015d9b9b146d0fc17">SBUS_RX_BUF</a>[9]&lt;&lt;9)&amp;0x07FF;</div>
<div class="line"><a id="l00057" name="l00057"></a><span class="lineno">   57</span>            <a class="code hl_variable" href="_s_b_u_s_8c.html#af938609143ba6f0252e697394a2ff8ed">SBUS</a>.CH7=((int16_t)<a class="code hl_variable" href="_s_b_u_s_8c.html#a64486f5f617b54d015d9b9b146d0fc17">SBUS_RX_BUF</a>[i+9]&gt;&gt;2|((int16_t)<a class="code hl_variable" href="_s_b_u_s_8c.html#a64486f5f617b54d015d9b9b146d0fc17">SBUS_RX_BUF</a>[i+10]&lt;&lt;6))&amp;0x07FF;</div>
<div class="line"><a id="l00058" name="l00058"></a><span class="lineno">   58</span>            <a class="code hl_variable" href="_s_b_u_s_8c.html#af938609143ba6f0252e697394a2ff8ed">SBUS</a>.CH8=((int16_t)<a class="code hl_variable" href="_s_b_u_s_8c.html#a64486f5f617b54d015d9b9b146d0fc17">SBUS_RX_BUF</a>[i+10]&gt;&gt;5|((int16_t)<a class="code hl_variable" href="_s_b_u_s_8c.html#a64486f5f617b54d015d9b9b146d0fc17">SBUS_RX_BUF</a>[i+11]&lt;&lt;3))&amp;0x07FF;</div>
<div class="line"><a id="l00059" name="l00059"></a><span class="lineno">   59</span>            <a class="code hl_variable" href="_s_b_u_s_8c.html#af938609143ba6f0252e697394a2ff8ed">SBUS</a>.CH9=((int16_t)<a class="code hl_variable" href="_s_b_u_s_8c.html#a64486f5f617b54d015d9b9b146d0fc17">SBUS_RX_BUF</a>[i+12]&gt;&gt;0|((int16_t)<a class="code hl_variable" href="_s_b_u_s_8c.html#a64486f5f617b54d015d9b9b146d0fc17">SBUS_RX_BUF</a>[i+13]&lt;&lt;8))&amp;0x07FF;</div>
<div class="line"><a id="l00060" name="l00060"></a><span class="lineno">   60</span>            <a class="code hl_variable" href="_s_b_u_s_8c.html#af938609143ba6f0252e697394a2ff8ed">SBUS</a>.CH10=((int16_t)<a class="code hl_variable" href="_s_b_u_s_8c.html#a64486f5f617b54d015d9b9b146d0fc17">SBUS_RX_BUF</a>[i+13]&gt;&gt;3|((int16_t)<a class="code hl_variable" href="_s_b_u_s_8c.html#a64486f5f617b54d015d9b9b146d0fc17">SBUS_RX_BUF</a>[i+14]&lt;&lt;5))&amp;0x07FF;</div>
<div class="line"><a id="l00061" name="l00061"></a><span class="lineno">   61</span>            <a class="code hl_variable" href="_s_b_u_s_8c.html#af938609143ba6f0252e697394a2ff8ed">SBUS</a>.CH11=((int16_t)<a class="code hl_variable" href="_s_b_u_s_8c.html#a64486f5f617b54d015d9b9b146d0fc17">SBUS_RX_BUF</a>[i+14]&gt;&gt;6|((int16_t)<a class="code hl_variable" href="_s_b_u_s_8c.html#a64486f5f617b54d015d9b9b146d0fc17">SBUS_RX_BUF</a>[i+15]&lt;&lt;2)|(int16_t)<a class="code hl_variable" href="_s_b_u_s_8c.html#a64486f5f617b54d015d9b9b146d0fc17">SBUS_RX_BUF</a>[i+16]&lt;&lt;10)&amp;0x07FF;</div>
<div class="line"><a id="l00062" name="l00062"></a><span class="lineno">   62</span>            <a class="code hl_variable" href="_s_b_u_s_8c.html#af938609143ba6f0252e697394a2ff8ed">SBUS</a>.CH12=((int16_t)<a class="code hl_variable" href="_s_b_u_s_8c.html#a64486f5f617b54d015d9b9b146d0fc17">SBUS_RX_BUF</a>[i+16]&gt;&gt;1|((int16_t)<a class="code hl_variable" href="_s_b_u_s_8c.html#a64486f5f617b54d015d9b9b146d0fc17">SBUS_RX_BUF</a>[i+17]&lt;&lt;7))&amp;0x07FF;</div>
<div class="line"><a id="l00063" name="l00063"></a><span class="lineno">   63</span>            <a class="code hl_variable" href="_s_b_u_s_8c.html#af938609143ba6f0252e697394a2ff8ed">SBUS</a>.CH13=((int16_t)<a class="code hl_variable" href="_s_b_u_s_8c.html#a64486f5f617b54d015d9b9b146d0fc17">SBUS_RX_BUF</a>[i+17]&gt;&gt;4|((int16_t)<a class="code hl_variable" href="_s_b_u_s_8c.html#a64486f5f617b54d015d9b9b146d0fc17">SBUS_RX_BUF</a>[i+18]&lt;&lt;4))&amp;0x07FF;</div>
<div class="line"><a id="l00064" name="l00064"></a><span class="lineno">   64</span>            <a class="code hl_variable" href="_s_b_u_s_8c.html#af938609143ba6f0252e697394a2ff8ed">SBUS</a>.CH14=((int16_t)<a class="code hl_variable" href="_s_b_u_s_8c.html#a64486f5f617b54d015d9b9b146d0fc17">SBUS_RX_BUF</a>[i+18]&gt;&gt;7|((int16_t)<a class="code hl_variable" href="_s_b_u_s_8c.html#a64486f5f617b54d015d9b9b146d0fc17">SBUS_RX_BUF</a>[i+19]&lt;&lt;1)|(int16_t)<a class="code hl_variable" href="_s_b_u_s_8c.html#a64486f5f617b54d015d9b9b146d0fc17">SBUS_RX_BUF</a>[i+20]&lt;&lt;9)&amp;0x07FF;</div>
<div class="line"><a id="l00065" name="l00065"></a><span class="lineno">   65</span>            <a class="code hl_variable" href="_s_b_u_s_8c.html#af938609143ba6f0252e697394a2ff8ed">SBUS</a>.CH15=((int16_t)<a class="code hl_variable" href="_s_b_u_s_8c.html#a64486f5f617b54d015d9b9b146d0fc17">SBUS_RX_BUF</a>[i+20]&gt;&gt;2|((int16_t)<a class="code hl_variable" href="_s_b_u_s_8c.html#a64486f5f617b54d015d9b9b146d0fc17">SBUS_RX_BUF</a>[i+21]&lt;&lt;6))&amp;0x07FF;</div>
<div class="line"><a id="l00066" name="l00066"></a><span class="lineno">   66</span>            <a class="code hl_variable" href="_s_b_u_s_8c.html#af938609143ba6f0252e697394a2ff8ed">SBUS</a>.CH16=((int16_t)<a class="code hl_variable" href="_s_b_u_s_8c.html#a64486f5f617b54d015d9b9b146d0fc17">SBUS_RX_BUF</a>[i+21]&gt;&gt;5|((int16_t)<a class="code hl_variable" href="_s_b_u_s_8c.html#a64486f5f617b54d015d9b9b146d0fc17">SBUS_RX_BUF</a>[i+22]&lt;&lt;3))&amp;0x07FF;</div>
<div class="line"><a id="l00067" name="l00067"></a><span class="lineno">   67</span>            <span class="keywordflow">if</span>((<a class="code hl_variable" href="_s_b_u_s_8c.html#a64486f5f617b54d015d9b9b146d0fc17">SBUS_RX_BUF</a>[i+23]&amp;0x4)&amp;&amp;(<a class="code hl_variable" href="_s_b_u_s_8c.html#a64486f5f617b54d015d9b9b146d0fc17">SBUS_RX_BUF</a>[i+23]&amp;0x8))</div>
<div class="line"><a id="l00068" name="l00068"></a><span class="lineno">   68</span>                <a class="code hl_variable" href="_s_b_u_s_8c.html#af938609143ba6f0252e697394a2ff8ed">SBUS</a>.ConnectState=0;</div>
<div class="line"><a id="l00069" name="l00069"></a><span class="lineno">   69</span>            <span class="keywordflow">else</span></div>
<div class="line"><a id="l00070" name="l00070"></a><span class="lineno">   70</span>                <a class="code hl_variable" href="_s_b_u_s_8c.html#af938609143ba6f0252e697394a2ff8ed">SBUS</a>.ConnectState=100;</div>
<div class="line"><a id="l00071" name="l00071"></a><span class="lineno">   71</span>        }</div>
<div class="line"><a id="l00072" name="l00072"></a><span class="lineno">   72</span>    }</div>
<div class="line"><a id="l00073" name="l00073"></a><span class="lineno">   73</span>            <span class="comment">// SBUS.CH1=((int16_t)data[0]&gt;&gt;0|((int16_t)data[1]&lt;&lt;8))&amp;0x07FF;</span></div>
<div class="line"><a id="l00074" name="l00074"></a><span class="lineno">   74</span>            <span class="comment">// SBUS.CH2=((int16_t)data[1]&gt;&gt;3|((int16_t)data[2]&lt;&lt;5))&amp;0x07FF;</span></div>
<div class="line"><a id="l00075" name="l00075"></a><span class="lineno">   75</span>            <span class="comment">// SBUS.CH3=((int16_t)data[2]&gt;&gt;6|((int16_t)data[3]&lt;&lt;2)|(int16_t)data[4]&lt;&lt;10)&amp;0x07FF;</span></div>
<div class="line"><a id="l00076" name="l00076"></a><span class="lineno">   76</span>            <span class="comment">// SBUS.CH4=((int16_t)data[4]&gt;&gt;1|((int16_t)data[5]&lt;&lt;7))&amp;0x07FF;</span></div>
<div class="line"><a id="l00077" name="l00077"></a><span class="lineno">   77</span>            <span class="comment">// SBUS.CH5=((int16_t)data[5]&gt;&gt;4|((int16_t)data[6]&lt;&lt;4))&amp;0x07FF;</span></div>
<div class="line"><a id="l00078" name="l00078"></a><span class="lineno">   78</span>            <span class="comment">// SBUS.CH6=((int16_t)data[6]&gt;&gt;7|((int16_t)data[7]&lt;&lt;1)|(int16_t)data[8]&lt;&lt;9)&amp;0x07FF;</span></div>
<div class="line"><a id="l00079" name="l00079"></a><span class="lineno">   79</span>            <span class="comment">// SBUS.CH7=((int16_t)data[8]&gt;&gt;2|((int16_t)data[9]&lt;&lt;6))&amp;0x07FF;</span></div>
<div class="line"><a id="l00080" name="l00080"></a><span class="lineno">   80</span>            <span class="comment">// SBUS.CH8=((int16_t)data[9]&gt;&gt;5|((int16_t)data[10]&lt;&lt;3))&amp;0x07FF;</span></div>
<div class="line"><a id="l00081" name="l00081"></a><span class="lineno">   81</span>            <span class="comment">// SBUS.CH9=((int16_t)data[11]&gt;&gt;0|((int16_t)data[12]&lt;&lt;8))&amp;0x07FF;</span></div>
<div class="line"><a id="l00082" name="l00082"></a><span class="lineno">   82</span>            <span class="comment">// SBUS.CH10=((int16_t)data[12]&gt;&gt;3|((int16_t)data[13]&lt;&lt;5))&amp;0x07FF;</span></div>
<div class="line"><a id="l00083" name="l00083"></a><span class="lineno">   83</span>            <span class="comment">// SBUS.CH11=((int16_t)data[13]&gt;&gt;6|((int16_t)data[14]&lt;&lt;2)|(int16_t)data[15]&lt;&lt;10)&amp;0x07FF;</span></div>
<div class="line"><a id="l00084" name="l00084"></a><span class="lineno">   84</span>            <span class="comment">// SBUS.CH12=((int16_t)data[15]&gt;&gt;1|((int16_t)data[16]&lt;&lt;7))&amp;0x07FF;</span></div>
<div class="line"><a id="l00085" name="l00085"></a><span class="lineno">   85</span>            <span class="comment">// SBUS.CH13=((int16_t)data[16]&gt;&gt;4|((int16_t)data[17]&lt;&lt;4))&amp;0x07FF;</span></div>
<div class="line"><a id="l00086" name="l00086"></a><span class="lineno">   86</span>            <span class="comment">// SBUS.CH14=((int16_t)data[17]&gt;&gt;7|((int16_t)data[18]&lt;&lt;1)|(int16_t)data[19]&lt;&lt;9)&amp;0x07FF;</span></div>
<div class="line"><a id="l00087" name="l00087"></a><span class="lineno">   87</span>            <span class="comment">// SBUS.CH15=((int16_t)data[19]&gt;&gt;2|((int16_t)data[20]&lt;&lt;6))&amp;0x07FF;</span></div>
<div class="line"><a id="l00088" name="l00088"></a><span class="lineno">   88</span>            <span class="comment">// SBUS.CH16=((int16_t)data[20]&gt;&gt;5|((int16_t)data[21]&lt;&lt;3))&amp;0x07FF;</span></div>
<div class="line"><a id="l00089" name="l00089"></a><span class="lineno">   89</span>}</div>
<div class="ttc" id="a_s_b_u_s_8c_html_a64486f5f617b54d015d9b9b146d0fc17"><div class="ttname"><a href="_s_b_u_s_8c.html#a64486f5f617b54d015d9b9b146d0fc17">SBUS_RX_BUF</a></div><div class="ttdeci">uint8_t SBUS_RX_BUF[SBUS_BUFFER_SIZE]</div><div class="ttdoc">SBUS接收缓冲区</div><div class="ttdef"><b>Definition</b> <a href="_s_b_u_s_8c_source.html#l00034">SBUS.c:34</a></div></div>
<div class="ttc" id="a_s_b_u_s_8c_html_acfde23885769240b79347341938fa1c6"><div class="ttname"><a href="_s_b_u_s_8c.html#acfde23885769240b79347341938fa1c6">SBUS_Analyze</a></div><div class="ttdeci">void SBUS_Analyze(void)</div><div class="ttdoc">SBUS接受与解码</div><div class="ttdef"><b>Definition</b> <a href="_s_b_u_s_8c_source.html#l00045">SBUS.c:45</a></div></div>
<div class="ttc" id="a_s_b_u_s_8c_html_af938609143ba6f0252e697394a2ff8ed"><div class="ttname"><a href="_s_b_u_s_8c.html#af938609143ba6f0252e697394a2ff8ed">SBUS</a></div><div class="ttdeci">SBUS_CH SBUS</div><div class="ttdoc">SBUS状态</div><div class="ttdef"><b>Definition</b> <a href="_s_b_u_s_8c_source.html#l00032">SBUS.c:32</a></div></div>
<div class="ttc" id="a_s_b_u_s_8h_html"><div class="ttname"><a href="_s_b_u_s_8h.html">SBUS.h</a></div></div>
<div class="ttc" id="a_s_b_u_s_8h_html_a0eb14764b7d79cc11d6e5d04cab47fc1"><div class="ttname"><a href="_s_b_u_s_8h.html#a0eb14764b7d79cc11d6e5d04cab47fc1">SBUS_BUFFER_SIZE</a></div><div class="ttdeci">#define SBUS_BUFFER_SIZE</div><div class="ttdoc">SBUS缓存区大小</div><div class="ttdef"><b>Definition</b> <a href="_s_b_u_s_8h_source.html#l00027">SBUS.h:27</a></div></div>
<div class="ttc" id="a_s_b_u_s_8h_html_a52f9a3a2bf446dbaf5f46770d6376727"><div class="ttname"><a href="_s_b_u_s_8h.html#a52f9a3a2bf446dbaf5f46770d6376727">SBUS_FRAME_SIZE</a></div><div class="ttdeci">#define SBUS_FRAME_SIZE</div><div class="ttdoc">SBUS数据包大小</div><div class="ttdef"><b>Definition</b> <a href="_s_b_u_s_8h_source.html#l00029">SBUS.h:29</a></div></div>
<div class="ttc" id="a_s_b_u_s_8h_html_a606b171ae009f4c9da0ff6a32de11325"><div class="ttname"><a href="_s_b_u_s_8h.html#a606b171ae009f4c9da0ff6a32de11325">SBUS_FRAME_FOOTER</a></div><div class="ttdeci">#define SBUS_FRAME_FOOTER</div><div class="ttdoc">SBUS帧尾</div><div class="ttdef"><b>Definition</b> <a href="_s_b_u_s_8h_source.html#l00033">SBUS.h:33</a></div></div>
<div class="ttc" id="a_s_b_u_s_8h_html_af3b2b5247a4c3e7e0d5c9eda5109fb72"><div class="ttname"><a href="_s_b_u_s_8h.html#af3b2b5247a4c3e7e0d5c9eda5109fb72">SBUS_FRAME_HEADER</a></div><div class="ttdeci">#define SBUS_FRAME_HEADER</div><div class="ttdoc">SBUS帧头</div><div class="ttdef"><b>Definition</b> <a href="_s_b_u_s_8h_source.html#l00031">SBUS.h:31</a></div></div>
<div class="ttc" id="astruct_s_b_u_s___c_h_html"><div class="ttname"><a href="struct_s_b_u_s___c_h.html">SBUS_CH</a></div><div class="ttdoc">SBUS状态结构体</div><div class="ttdef"><b>Definition</b> <a href="_s_b_u_s_8h_source.html#l00046">SBUS.h:47</a></div></div>
</div><!-- fragment --></div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated by&#160;<a href="https://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.7
</small></address>
</body>
</html>
